import com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException;
import inspur.dao.BookDao;
import inspur.entity.BookObject;

import java.util.ArrayList;

public class test {
    public static  void  main(String[] args){
        BookDao dao=new BookDao();
        BookObject mybook = new BookObject("x123","格林童话","人民教育出版社","《格林童话》是由德国语言学家，雅可布·格林和威廉·格林兄弟收集、整理、加工完成的德国民间文学。它是世界童话的经典之作，自问世以来，在世界各地影响十分广泛。");
        System.out.println("my"+mybook.getBookName());
          dao.UpLoadBook(new BookObject("y97","C++从零到入门","清华出版社","世界著名童话"));
//        dao.UpLoadBook(new BookObject("x124","JSP从入门到放弃","清华出版社","世界著名编程语言"));
        ArrayList<BookObject> arrayListBook=BookDao.SelectBookByPress("浪潮优派出版社");
        for (BookObject a:arrayListBook
             ) {
            System.out.println(a.getBookName());
        }
    }
}
